In mathematics and theoretical physics, the functional derivative is a generalization of the gradient. While the latter differentiates with respect to a vector with discrete components, the former differentiates with respect to a continuous function. Both of these can be viewed as extensions of the simple one-dimensional derivative in usual calculus. The mathematically formal treatment is the subject of functional analysis.
Contents |
Given a manifold M representing (continuous/smooth/with certain boundary conditions/etc.) functions φ and a functional F defined as
the functional derivative of F, denoted , is a distribution such that for all test functions f
Using the first variation of , , in place of yields the first variation of , ; this is similar to how the differential is obtained from the gradient. Using a function with unit norm yields the directional derivative along that function.
In physics, it's common to use the Dirac delta function in place of a generic test function , for yielding the functional derivative at the point (this is a point of the whole functional derivative as a partial derivative is a component of the gradient):
This works in cases when formally can be expanded as a series (or at least up to first order) in . The formula is however not mathematically rigorous, since is usually not even defined.
The definition of a functional derivative may be made more mathematically precise and formal by defining the space of functions more carefully. For example, when the space of functions is a Banach space, the functional derivative becomes known as the Fréchet derivative, while one uses the Gâteaux derivative on more general locally convex spaces. Note that the well-known Hilbert spaces are special cases of Banach spaces. The more formal treatment allows many theorems from ordinary calculus and analysis to be generalized to corresponding theorems in functional analysis, as well as numerous new theorems to be stated.
The definition given above is based on a relationship that holds for all test functions f, so one might think that it should hold also when f is chosen to be a specific function as the delta function. However, the latter is not a valid test function.
In the definition, the functional derivative describes how the functional changes as a result of a small change in the entire function . The particular form of the change in is not specified, but it should stretch over the whole interval on which is defined. Employing the particular form of the perturbation given by the delta function has the meaning that is varied only in the point . Except for this point, there is no variation in .
Often a physicist wants to know how one quantity, say the electric potential at position , is affected by changing another quantity, say the density of electric charge at position . The potential at a given position is a functional of the density, that is, given a particular density function and a point in space, one can compute a number which represents the potential of that point in space due to the specified density function. Since we are interested in how this number varies across all points in space, we treat the potential as a function of . To wit,
That is, for each , the potential is a functional of . Applying the definition of functional derivative,
So,
Now we can evaluate the functional derivative at and to see how the potential at is changed due to a small variation in the density at , but in general the unevaluated form is probably more useful.
We give a formula to derive a common class of functionals that can be written as the integral of a function and its derivatives. This is a generalization of the Euler–Lagrange equation: indeed, the functional derivative was introduced in physics within the derivation of the Lagrange equation of the second kind from the principle of least action in Lagrangian mechanics (18th century). The first three examples below are taken from density functional theory (20th century), the fourth from statistical mechanics (19th century).
Given a functional of the form
with vanishing at the boundaries of , the scalar product of the functional derivative with a function can be written
where, in the third line, is assumed at the integration boundaries. Thus the functional derivative is
or, writing the expression more explicitly,
The above example is specific to the particular case that the functional depends on the function and its gradient only. In the more general case that the functional depends on higher order derivatives, i.e.
where is a tensor whose components are all partial derivative operators of order , i.e. with , an analogous application of the definition yields
The Thomas-Fermi model of 1927 used a kinetic energy functional for a noninteracting uniform electron gas in a first attempt of density-functional theory of electronic structure:
depends only on the charge density and does not depend on its gradient, Laplacian, or other higher-order derivatives (functionals like this are called “local”). Therefore,
For the classical part of the potential, Thomas and Fermi employed the Coulomb potential energy functional
Again, depends only on the charge density and does not depend on its gradient, Laplacian, or other higher-order derivatives (i.e., it is a “local” functional). Therefore,
The second functional derivative of the Coulomb potential energy functional is
In 1935 von Weizsäcker proposed to add a gradient correction to the Thomas-Fermi kinetic energy functional to make it suit better a molecular electron cloud:
Now depends on the charge density and its gradient , therefore
Finally, note that any function can be written in terms of an integral functional. For example,
This functional depends on only, as the first two examples above (i.e., they are all “local”). Therefore,
The entropy of a discrete random variable is a functional of the probability mass function.
Thus,
Thus,
Let
Using the delta function as a test function,
Thus,